package com.wn.consumer.controller;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.stu.api.StuApi;
import com.stu.api.UserFeginClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("test")
public class TestController {

//    @Autowired
//    private StuApi stuApi;
//
//    @GetMapping("/test/find/{id}")
//    public String find(@PathVariable("id")Integer id){
//        return stuApi.find(id);
//    }

    @Autowired
    private UserFeginClient userFeginClient;

    @GetMapping("/show")
    public String show(){
        return userFeginClient.testShow();
    }

}